import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get_navigation/src/root/get_material_app.dart';
import 'package:niuren_demo/page/dynamic/dynamic_page.dart';
import 'package:niuren_demo/page/main/main_page.dart';
import 'package:niuren_demo/routers/app_routers.dart';
import 'package:niuren_demo/routers/nr_router.dart';

void main() {
  _configRouter();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      designSize: Size(375, 812),
      builder: () => GetMaterialApp(
        title: 'HUOBI Demo',
        theme: ThemeData(
          highlightColor: Colors.transparent,
          splashColor: Colors.transparent,
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        home: MainPage(),
      ),
    );
  }
}

_configRouter() {
  final router = FluroRouter();
  AppRouters.configureRoutes(router);
  HBRouter.router = router;
}
